<?php
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
?>


<?php
$_REQUEST['ai_applydate']=date(Y . '-' . m . '-' . d . ' ' . H . '-' . i . '-' . s);
$_REQUEST['ai_authur']=$_SESSION['username'];

//传递过来的页面信息。返回的时候，会根据这些信息返回原来的页面
$nowpageid      = addslashes($_REQUEST['nowpageid']);
$sortby         = addslashes($_REQUEST['sortby']);
$term_nid       = addslashes($_REQUEST['term_nid']);

$_REQUEST['ai_ip']   = $_SERVER["REMOTE_ADDR"];


//这里是设计上传文件的部分：包含图片和附件。视频也应该用这种形式上传
//统一设置一下保存图片的路径
$_uf['path'] = ROOT_PATH_ . "/uploadfiles/member/";


//上传icon
if (is_uploaded_file($_FILES['icon']['tmp_name'])) {
    $_uf['upfile']       = $_FILES['icon'];
    $_info               = upload_file($_uf);
    $_REQUEST['ai_icon'] = $_info['name'];
}



//设置需要搜索的表格的前缀后缀
$table_Suffix = "member";
$table = $table_Prefix . $table_Suffix;


$sql=insert_date($table,$_REQUEST);

$query = mysql_query($sql) or die (mysql_error().$sql);
mysql_close($con);



?>

<script type="text/javascript">
    alert("输入信息已保存，点击确认返回继续操作.");
    document.location.href = "detail-list.php?nav-itemed=member";
</script>




